package com.eling.elcms.travel.model;

import com.eling.elcms.core.dao.annotation.In;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;

import javax.persistence.*;

/**
 * 联盟结算详细
 * 
 * @author zhoulin
 *
 */
@Entity
@Table(name = "travel_alliancesetldetail")
@Indexed
public class AllianceSetlDetail extends BaseModel {

	private static final long serialVersionUID = -3245829397454314376L;

	@Id
	@In
	@DocumentId
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long pkAllianceSetlDetail;

	/** 联盟结算 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pkAllianceSettlement")
	@IndexedEmbedded(depth = 1)
	private AllianceSettlement allianceSettlement;

	/** 收费 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pkSignUpCharge")
	@IndexedEmbedded(depth = 1)
	private SignUpCharge signUpCharge;

	/** 联盟酒店费用 */
	@Column
	@Field
	private Double allianceCharges;

	/** 组团管理费 */
	@Column
	@Field
	private Double manageCharges;

	/** 其他费用 */
	@Column
	@Field
	private Double otherCharges;

	/** 权证抵扣 */
	@Column
	@Field
	private Double deductionCharges;

	/** 结算完成 */
	@Column
	@Field
	private Boolean finish;

	@Version
	private Integer version;

	public Long getPkAllianceSetlDetail() {
		return pkAllianceSetlDetail;
	}

	public void setPkAllianceSetlDetail(Long pkAllianceSetlDetail) {
		this.pkAllianceSetlDetail = pkAllianceSetlDetail;
	}

	public AllianceSettlement getAllianceSettlement() {
		return allianceSettlement;
	}

	public void setAllianceSettlement(AllianceSettlement allianceSettlement) {
		this.allianceSettlement = allianceSettlement;
	}

	public SignUpCharge getSignUpCharge() {
		return signUpCharge;
	}

	public void setSignUpCharge(SignUpCharge signUpCharge) {
		this.signUpCharge = signUpCharge;
	}

	public Double getAllianceCharges() {
		return allianceCharges;
	}

	public void setAllianceCharges(Double allianceCharges) {
		this.allianceCharges = allianceCharges;
	}

	public Double getManageCharges() {
		return manageCharges;
	}

	public void setManageCharges(Double manageCharges) {
		this.manageCharges = manageCharges;
	}

	public Double getOtherCharges() {
		return otherCharges;
	}

	public void setOtherCharges(Double otherCharges) {
		this.otherCharges = otherCharges;
	}

	public Double getDeductionCharges() {
		return deductionCharges;
	}

	public void setDeductionCharges(Double deductionCharges) {
		this.deductionCharges = deductionCharges;
	}

	public Boolean getFinish() {
		return finish;
	}

	public void setFinish(Boolean finish) {
		this.finish = finish;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

}
